﻿namespace Ross.EntityFramework.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class RossTranDb : DbMigration
    {
        public override void Up()
        {
            DropPrimaryKey("dbo.CourseClass");
            DropPrimaryKey("dbo.Course");
            AlterColumn("dbo.CourseClass", "ID", c => c.Int(nullable: false, identity: true));
            AlterColumn("dbo.CourseClass", "ParentID", c => c.Int(nullable: false));
            AlterColumn("dbo.Course", "ID", c => c.Long(nullable: false, identity: true));
            AddPrimaryKey("dbo.CourseClass", "ID");
            AddPrimaryKey("dbo.Course", "ID");
        }
        
        public override void Down()
        {
            DropPrimaryKey("dbo.Course");
            DropPrimaryKey("dbo.CourseClass");
            AlterColumn("dbo.Course", "ID", c => c.Int(nullable: false, identity: true));
            AlterColumn("dbo.CourseClass", "ParentID", c => c.String(maxLength: 50));
            AlterColumn("dbo.CourseClass", "ID", c => c.Long(nullable: false, identity: true));
            AddPrimaryKey("dbo.Course", "ID");
            AddPrimaryKey("dbo.CourseClass", "ID");
        }
    }
}
